import scipy.sparse as sp
import torch
import numpy as np

train = sp.dok_matrix((2, 3), dtype=np.int)
train[0, 1] = 3
train[1, 2] = 1

for x in train.items():
    print(x, x[0], x[1], type(x))